package com.erp.employee.ao.idl;

import java.util.Map;

import com.erp.employee.ao.idl.EmployeePos.EmployeeFilterPo;
import com.erp.employee.ao.idl.EmployeePos.EmployeePo;
import com.paipai.lang.uint32_t;
import com.paipai.util.annotation.ApiProtocol;
import com.paipai.util.annotation.Field;
import com.paipai.util.annotation.HeadApiProtocol;

@HeadApiProtocol(cPlusNamespace = "erp::employee::ao", needInit = true,needReset=true,serviceType="ao",platformType="erp")
public class EmployeeAo {
	@ApiProtocol(cmdid = "0xC001801L", desc = " 根据ID获取员工信息 ")
	class GetEmployeeById
	{
		class Req 
		{
			@Field(desc = "机器码，必填 ")
	        String machineKey;

	        @Field(desc = "调用来源，必填 ")
	        String source;

	        @Field(desc = "场景id，必填 ")
	        uint32_t sceneId;					
			
			@Field(desc = "过滤器，必填 ")
			EmployeeFilterPo employeeFilter;

			@Field(desc = "请求保留字 ")
			String inReserve;
		}
		class Resp 
		{
			@Field(desc = "错误信息 ")
			String errmsg;
			
			@Field(desc = "员工信息 ")
			Map<uint32_t,EmployeePo> employees;
			
			@Field(desc = "返回保留字  ")
			String outReserve;
		}
	};
	
	
	@ApiProtocol(cmdid = "0xC0011802L", desc = " 写入员工信息 ")
	class AddEmployee
	{
		class Req 
		{
			@Field(desc = "机器码，必填 ")
	        String machineKey;

	        @Field(desc = "调用来源，必填 ")
	        String source;

	        @Field(desc = "场景id，必填 ")
	        uint32_t sceneId;					
			
			@Field(desc = "员工信息列表，必填 ")
			EmployeePo employee;

			@Field(desc = "请求保留字 ")
			String inReserve;
		}
		class Resp 
		{
			@Field(desc = "错误信息 ")
			String errmsg;
			
			@Field(desc = "员工信息列表，必填 ")
			EmployeePo employeeBack;
			
			@Field(desc = "返回保留字  ")
			String outReserve;
		}
	};
}
